package com.mini.test.netty;

import org.jboss.netty.channel.ChannelEvent;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.channel.MessageEvent;
import org.jboss.netty.channel.SimpleChannelUpstreamHandler;

public class ServerHandler extends SimpleChannelUpstreamHandler {
	
	@Override
	public void handleUpstream(ChannelHandlerContext ctx,ChannelEvent ce) throws Exception{
		super.handleUpstream(ctx, ce);
	}
	
	@Override
	public void messageReceived(ChannelHandlerContext ctx,MessageEvent ce) throws Exception{
		String msg = (String)ce.getMessage();
		System.out.println(msg);
	}
	
	

}
